package com.fast.manager.base.repository;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.fast.commons.repository.BaseMapper;
import com.fast.manager.base.domain.Company;

public interface CompanyMapper extends BaseMapper<Company> {
	
	/**
	 * 查询所有一级的目录
	 * @return
	 */
	public List<Company> findAllCompanyRoot() ;
	
	/**
	 * 根据ID查询子目录
	 * @param id
	 * @return
	 */
	public List<Company> findCompanyChild(@Param("company_id") Integer company_id) ;
	
	
	/**
	 * 排序
	 * @param pid
	 * @param id
	 * @return
	 */
	public int nextSort(@Param("pid") Long pid, @Param("id") Long id);
	
}